/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Model;

import java.io.Serializable;

import java.util.Vector;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;

/**
 *
 * @author Admin
 */
public class Book implements Serializable {

    public String BookID, Title, Author;
    public String Sumary, CategoryID, Publisher;
    public boolean Active;
    private String categoryName;
    public Book() {
        
    }

    public Book(String BookID, String Title, String Author, String Sumary, String CategoryID, String Publisher, boolean Active) {
        this.BookID = BookID;
        this.Title = Title;
        this.Author = Author;
        this.Sumary = Sumary;
        this.CategoryID = CategoryID;
        this.Publisher = Publisher;
        this.Active = Active;
    }
    
    public void setCategoryName(String categoryName)
    {
        this.categoryName = categoryName;
    }
    public String getCategoryName()
    {
        return categoryName;
    }
  @Override
    public String toString() {
        return String.format("%s %s %s %s \n%s \n%s %s", BookID, Title, Author, Sumary, CategoryID, Publisher, Active ? "True" : "False");
    }
      
      public Vector toVector() {
        Vector v = new Vector();
        v.addElement(BookID);        
        v.addElement(Title);
        v.addElement(Author);
        v.addElement(categoryName);
        return v;

    }  
    

  

   

   

    
}
